package com.easa.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Weektable {
    private String weekid;
    private String semester;
    private String weekStartDate;
    private String weekEndDate;
    private Integer weekNum;

    @Id
    @Column(name = "weekid")
    public String getWeekid() {
        return weekid;
    }

    public void setWeekid(String weekid) {
        this.weekid = weekid;
    }

    @Basic
    @Column(name = "semester")
    public String getSemester() {
        return semester;
    }

    public void setSemester(String semester) {
        this.semester = semester;
    }

    @Basic
    @Column(name = "weekStartDate")
    public String getWeekStartDate() {
        return weekStartDate;
    }

    public void setWeekStartDate(String weekStartDate) {
        this.weekStartDate = weekStartDate;
    }

    @Basic
    @Column(name = "weekEndDate")
    public String getWeekEndDate() {
        return weekEndDate;
    }

    public void setWeekEndDate(String weekEndDate) {
        this.weekEndDate = weekEndDate;
    }

    @Basic
    @Column(name = "weekNum")
    public Integer getWeekNum() {
        return weekNum;
    }

    public void setWeekNum(Integer weekNum) {
        this.weekNum = weekNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Weektable weektable = (Weektable) o;

        if (weekid != null ? !weekid.equals(weektable.weekid) : weektable.weekid != null) return false;
        if (semester != null ? !semester.equals(weektable.semester) : weektable.semester != null) return false;
        if (weekStartDate != null ? !weekStartDate.equals(weektable.weekStartDate) : weektable.weekStartDate != null)
            return false;
        if (weekEndDate != null ? !weekEndDate.equals(weektable.weekEndDate) : weektable.weekEndDate != null)
            return false;
        if (weekNum != null ? !weekNum.equals(weektable.weekNum) : weektable.weekNum != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = weekid != null ? weekid.hashCode() : 0;
        result = 31 * result + (semester != null ? semester.hashCode() : 0);
        result = 31 * result + (weekStartDate != null ? weekStartDate.hashCode() : 0);
        result = 31 * result + (weekEndDate != null ? weekEndDate.hashCode() : 0);
        result = 31 * result + (weekNum != null ? weekNum.hashCode() : 0);
        return result;
    }
}
